/*
 * MarkerEventData.h
 *
 *  Created on: Oct 9, 2009
 *      Author: tiago.zaccaro
 */

#ifndef MARKEREVENTDATA_H_
#define MARKEREVENTDATA_H_

namespace Touchless {

class MarkerEventData {
public:
	MarkerEventData() : mArea(0), mX(0), mY(0), mDX(0), mDY(0), mTop(0), mButtom(0), mLeft(0), mRight(0) {};
	virtual ~MarkerEventData();

	/// <summary>
	/// If the marker is currently present
	/// </summary>
	bool getPresent() { return mArea > 0; }

	/// <summary>
	/// Current X position of the marker
	/// </summary>
	double getX() {return mX; }

	/// <summary>
	/// Current Y position of the marker
	/// </summary>
	double getY() { return mY; }

	/// <summary>
	/// Relative distance in the X axis from the last processed location
	/// </summary>
	double getDX() { return mDX; }

	/// <summary>
	/// Relative distance in the Y axis from the last processed location
	/// </summary>
	double getDY() { return mDY; }

	/// <summary>
	/// The 2D volume of the marker
	/// </summary>
	double getArea() { return mArea; }

	/// <summary>
	/// The top of the bounding box of the marker area
	/// </summary>
	double getTop() { return mTop; }

	/// <summary>
	/// The bottom of the bounding box of the marker area
	/// </summary>
	double getBottom() { return mButtom; }

	/// <summary>
	/// The left of the bounding box of the marker area
	/// </summary>
	double getLeft() { return mLeft; }

	/// <summary>
	/// The right of the bounding box of the marker area
	/// </summary>
	double getRight() { return mRight; }

	/// <summary>
	/// The height of the bounding box of the marker area
	/// </summary>
	double getHeight() { return getRight() - getLeft(); }

	/// <summary>
	/// The width of the bounding box of the marker area
	/// </summary>
	double getWidth() { return getBottom() - getTop(); }

	/// <summary>
	/// A DateTime that reflects when this data was collected
	/// </summary>
	//DateTime Timestamp { get; internal set; }
protected:
	double mArea;
	double mX;
	double mY;
	double mDX;
	double mDY;
	double mTop;
	double mButtom;
	double mLeft;
	double mRight;
};

}

#endif /* MARKEREVENTDATA_H_ */
